/*
-----------------------------------------------------------------------------
Filename:    TutorialApplication.h
-----------------------------------------------------------------------------

This source file is part of the
   ___                 __    __ _ _    _ 
  /___\__ _ _ __ ___  / / /\ \ (_) | _(_)
 //  // _` | '__/ _ \ \ \/  \/ / | |/ / |
/ \_// (_| | | |  __/  \  /\  /| |   <| |
\___/ \__, |_|  \___|   \/  \/ |_|_|\_\_|
      |___/                              
      Tutorial Framework
      http://www.ogre3d.org/tikiwiki/
-----------------------------------------------------------------------------
*/
#ifndef __BLACKHOLESAPPLICATION_H__
#define __BLACKHOLESAPPLICATION_H__

#include "BaseApplication.h"
#include "Player.h"
#include "Ship.h"
#include <boost/any.hpp>
#include <vector>
#include <map>
#include "GameEngine.h"
#include "NetworkListener.h"

class BlackHolesApplication : public BaseApplication, public NetworkListener
{
public:
    BlackHolesApplication(void);
    virtual ~BlackHolesApplication(void);

protected:
	Ogre::Vector3 get_random_position();
	void createCrossHair(void);
    virtual void createScene(void);
	bool keyPressed( const OIS::KeyEvent &arg );
	bool keyReleased( const OIS::KeyEvent &arg );
	bool frameStarted (const Ogre::FrameEvent &evt);
	bool mouseMoved( const OIS::MouseEvent &arg );
	bool mousePressed( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
	bool mouseReleased( const OIS::MouseEvent &arg, OIS::MouseButtonID id );

	void player_joined(Player name,std::list<Player> players);
    void player_left(Player name,std::list<Player> players);
	void update_position();
    void update_position(Player player);

	void create_line(); 
	void createColourCube(); 

private:
	Player							 mMe;
	double							 mAccelerationStartTime;
	bool							 mAccelerationOn;
	Ogre::RaySceneQuery			    *mRaySceneQuery;     // The ray scene query pointer
	std::map<std::string,boost::any> mObjects;
	GameEngine						 mGe;
	
};

#endif // #ifndef __BLACKHOLESAPPLICATION_H__
